<HTML>
<HEAD>
<TITLE>[Chapter 21] AdjustmentEvent </TITLE>
<META NAME="author" CONTENT="John Zukowski">
<META NAME="date" CONTENT="Thu Jul 31 15:21:22 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java AWT">
<META NAME="title" CONTENT="Java AWT">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java AWT" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch21_02.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 21<br>java.awt.event Reference</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch21_04.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>AdjustmentEvent <img src="gifs/bstar.gif" alt="(New)" border=0></H1>

<H2>Name</H2>

AdjustmentEvent <img src="gifs/bstar.gif" alt="(New)" border=0>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch21-REFSECT1-AUTOID.13"></A></h2>
</DIV>


<p>
<img align=middle src="./figs/adjustm.gif" alt="[Graphic: Figure from the text]" width=502 height=82 border=0>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch21-REFSECT1-AUTOID.14">Description</A></h2>

<P CLASS=para>
<tt CLASS=literal>AdjustmentEvent</tt>s are generated 
by objects that implement the <tt CLASS=literal>Adjustable</tt> 
interface. <tt CLASS=literal>Scrollbar</tt> is one 
example of such an object. 

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch21-REFSECT1-AUTOID.15">Class Definition</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public class java.awt.event.AdjustmentEvent
   extends java.awt.AWTEvent {
  // Constants
  public final static int ADJUSTMENT_FIRST;
  public final static int ADJUSTMENT_LAST;
  public final static int ADJUSTMENT_VALUE_CHANGED;
  public final static int BLOCK_DECREMENT;
  public final static int BLOCK_INCREMENT;
  public final static int TRACK;
  public final static int UNIT_DECREMENT;
  public final static int UNIT_INCREMENT;
  // Constructors
  public AdjustmentEvent (Adjustable source, int id, int type, int value);
  // Instance Methods
  public Adjustable getAdjustable();
  public int getAdjustmentType();
  public int getValue();
  public String paramString();
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch21-REFSECT1-AUTOID.16">Constants</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.13">ADJUSTMENT_FIRST</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.14">public final static int ADJUSTMENT_FIRST</A></h4>

<P CLASS=para>
Specifies the beginning range of adjustment event ID values. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.14">ADJUSTMENT_LAST</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.15">public final static int ADJUSTMENT_LAST</A></h4>

<P CLASS=para>
Specifies the ending range of adjustment event ID values. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.15">ADJUSTMENT_VALUE_CHANGED</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.16">public final static int ADJUSTMENT_VALUE_CHANGED</A></h4>

<P CLASS=para>
Event type ID for value changed. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.16">BLOCK_DECREMENT</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.17">public final static int BLOCK_DECREMENT</A></h4>

<P CLASS=para>
Adjustment type for block decrement. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.17">BLOCK_INCREMENT</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.18">public final static int BLOCK_INCREMENT</A></h4>

<P CLASS=para>
Adjustment type for block increment. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.18">TRACK</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.19">public final static int TRACK</A></h4>

<P CLASS=para>
Adjustment type for tracking. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.19">UNIT_DECREMENT</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.20">public final static int UNIT_DECREMENT</A></h4>

<P CLASS=para>
Adjustment type for unit decrement. 

</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.20">UNIT_INCREMENT</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.21">public final static int UNIT_INCREMENT</A></h4>

<P CLASS=para>
Adjustment type for unit increment. 

</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch21-REFSECT1-AUTOID.17">Constructors</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.21">AdjustmentEvent</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.22">public AdjustmentEvent (Adjustable source, int id, int type, int value)</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Parameters<br>
<DD>

<P CLASS=para>
<P>
<DL CLASS=variablelist>
<DT CLASS=varlistentry><I CLASS=emphasis>source</I><br>
<DD>

<P CLASS=para>
The object that 
generated the event.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>id</I><br>
<DD>

<P CLASS=para>
The event type ID of 
the event.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>type</I><br>
<DD>

<P CLASS=para>
The type of adjustment 
event.

<p>
<DT CLASS=varlistentry><I CLASS=emphasis>value</I><br>
<DD>

<P CLASS=para>
The value of the 
<tt CLASS=literal>Adjustable</tt> object. </DL>
<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Constructs an <tt CLASS=literal>AdjustmentEvent</tt> 
with the given characteristics. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch21-REFSECT1-AUTOID.18">Instance Methods</A></h2>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.22">getAdjustable</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.23">public Adjustable getAdjustable()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The source of this event. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.23">getAdjustmentType</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.24">public int getAdjustmentType()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
One of the adjustment type constants. 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
The type will be <tt CLASS=literal>BLOCK_DECREMENT</tt>, 
<tt CLASS=literal>BLOCK_INCREMENT</tt>, <tt CLASS=literal>TRACK</tt>, 
<tt CLASS=literal>UNIT_DECREMENT</tt>, or <tt CLASS=literal>UNIT_INCREMENT</tt>. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.24">getValue</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.25">public int getValue()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
The new value of the <tt CLASS=literal>Adjustable</tt> 
object. </DL>
</DIV>

</DIV>

<DIV CLASS=refsect2>
<h3 CLASS=refsect2><A CLASS="TITLE" NAME="ch21-REFSECT2-AUTOID.25">paramString</A></h3>

<DIV CLASS=refsect3>
<h4 CLASS=refsect3><A CLASS="TITLE" NAME="ch21-REFSECT3-AUTOID.26">public String paramString()</A></h4>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Returns<br>
<DD>

<P CLASS=para>
String with current settings of the <tt CLASS=literal>AdjustmentEvent</tt>. 

<p>
<DT CLASS=varlistentry>Overrides<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>AWTEvent</tt><tt CLASS=literal>.paramString()</tt> 

<p>
<DT CLASS=varlistentry>Description<br>
<DD>

<P CLASS=para>
Helper method for <tt CLASS=literal>toString()</tt> 
to generate string of current settings. </DL>
</DIV>

</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch21-REFSECT1-AUTOID.19">See Also</A></h2>

<P CLASS=para>
<tt CLASS=literal>Adjustable</tt>, <tt CLASS=literal>AdjustmentListener</tt>, 
<tt CLASS=literal>AWTEvent</tt>, <tt CLASS=literal>Scrollbar</tt> 

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch21_02.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch21_04.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>ActionListener <img src="gifs/bstar.gif" alt="(New)" border=0></td>
<td width=171 align=center valign=top><a href="index/idx_a.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>AdjustmentListener <img src="gifs/bstar.gif" alt="(New)" border=0></td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
